home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / libiberty / Makefile < prev    next >
Makefile  |  1992-09-11  |  2KB  |  113 lines

  1. ALL=all.internal
  2. host_alias = sun4
  3. host_cpu = sparc
  4. host_vendor = sun
  5. host_os = sunos4
  6. target_alias = sun4
  7. target_cpu = sparc
  8. target_vendor = sun
  9. target_os = sunos4
  10. subdir =
  11. unsubdir = .
  12. VPATH = .
  13. #
  14. # Makefile for libiberty directory
  15. #
  16.  
  17. #CC = gcc -b$(target) -g -nostdinc
  18. #CFLAGS= -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include
  19.  
  20. # Most hosts want strerror, but one or two don't, and they override these
  21. # definitions in the host-dependent makefile fragment.
  22. STRERROR_C = strerror.c
  23. STRERROR_O = strerror.o
  24.  
  25. # Host and target-dependent makefile fragments come in here.
  26. ####
  27. # End of host and target-dependent makefile fragments.
  28.  
  29. srcdir = .
  30. destdir = /usr/local
  31.  
  32. libdir = $(destdir)/H-$(host_alias)/T-independent/lib
  33.  
  34. CFILES = getopt.c getopt1.c obstack.c $(STRERROR_C) $(HOST_CFILES)
  35. OFILES = getopt.o getopt1.o obstack.o $(STRERROR_O) $(HOST_OFILES)
  36.  
  37. TARGETLIB = libiberty.a
  38. RANLIB = ranlib
  39. AR = ar
  40. AR_FLAGS = crv
  41. CFLAGS = -I$(srcdir)/../include $(HDEFINES)
  42.  
  43. STAGESTUFF = $(TARGETLIB) $(OFILES)
  44.  
  45. all:    $(TARGETLIB)
  46.  
  47. install: all
  48.     cp $(TARGETLIB) $(libdir)/$(TARGETLIB).new
  49.     $(RANLIB) $(libdir)/$(TARGETLIB).new
  50.     mv -f $(libdir)/$(TARGETLIB).new $(libdir)/$(TARGETLIB)
  51.  
  52. $(TARGETLIB): $(OFILES)
  53.     rm -rf $(TARGETLIB)
  54.     $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
  55.     $(RANLIB) $(TARGETLIB)
  56.  
  57. .PHONEY: all etags tags ls clean stage1 stage2
  58.  
  59. stage1: force
  60.     - mkdir stage1
  61.     - mv -f $(STAGESTUFF) stage1
  62.  
  63. stage2: force
  64.     - mkdir stage2
  65.     - mv -f $(STAGESTUFF) stage2
  66.  
  67. stage3: force
  68.     - mkdir stage3
  69.     - mv -f $(STAGESTUFF) stage3
  70.  
  71. stage4: force
  72.     - mkdir stage4
  73.     - mv -f $(STAGESTUFF) stage4
  74.  
  75. against=stage2
  76.  
  77. comparison: force
  78.     for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
  79.  
  80. de-stage1: force
  81.     - (cd stage1 ; mv -f * ..)
  82.     - rmdir stage1
  83.  
  84. de-stage2: force
  85.     - (cd stage2 ; mv -f * ..)
  86.     - rmdir stage2
  87.  
  88. de-stage3: force
  89.     - (cd stage3 ; mv -f * ..)
  90.     - rmdir stage3
  91.  
  92. de-stage4: force
  93.     - (cd stage4 ; mv -f * ..)
  94.     - rmdir stage4
  95.  
  96. etags tags: TAGS
  97.  
  98. TAGS: $(CFILES)
  99.     etags $(HFILES) $(CFILES)
  100.  
  101. ls:
  102.     @echo Makefile $(HFILES) $(CFILES)
  103.  
  104. # Need to deal with profiled libraries, too.
  105.  
  106. clean:
  107.     rm -f *.a *.o core errs *~ \#* TAGS *.E
  108.  
  109. force:
  110.  
  111. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  112.     $(SHELL) ./config.status
  113.